import math
import time

t1 = time.time()
lis = [2,]

for i in range(3,1000000,2):
    if i % 2 == 0:
        break
    else:
        for j in range(3,int(math.sqrt(i)),2):
            if i % j == 0:
                break
        else:
            lis.append(i)
print (lis)
    
t2 = time.time()
print(t2 - t1)
